System, method and computer program product for capturing touch events for a virtual mobile device platform

ABSTRACT

Embodiments disclosed herein can allow a user of mobile device in a network environment to switch between using public network services and using private network services. To access private network services, a virtualization cloud client application running on mobile device connects to a virtualized device hosted in virtualization cloud and brokers access to private network services as well as local device functions. Embodiments disclosed herein provide a system, method, and computer program product for capturing touch events for a virtual mobile device platform and relaying the captured touch events to the virtual mobile device platform while ensuring that movements and speed of touch events are accurately represented at the virtual mobile device platform.

CROSS-REFERENCE TO RELATED APPLICATION(S)

This application is a continuation of and claims a benefit of priorityfrom U.S. patent application Ser. No. 15/449,708, filed Mar. 3, 2017,entitled “SYSTEM, METHOD AND COMPUTER PROGRAM PRODUCT FOR CAPTURINGTOUCH EVENTS FOR A VIRTUAL MOBILE DEVICE PLATFORM,” which is acontinuation of and claims a benefit of priority from U.S. patentapplication Ser. No. 14/160,794, filed Jan. 22, 2014, now U.S. Pat. No.9,619,673, entitled “SYSTEM, METHOD AND COMPUTER PROGRAM PRODUCT FORCAPTURING TOUCH EVENTS FOR A VIRTUAL MOBILE DEVICE PLATFORM,” which is aconversion of and claims a benefit of priority from U.S. ProvisionalApplication No. 61/755,205, filed Jan. 22, 2013, entitled “VIRTUALMOBILE DEVICE PLATFORM.” This application relates to U.S. patentapplication Ser. No. 14/160,877, filed Jan. 22, 2014, now U.S. Pat. No.9,380,562, entitled “SYSTEM, METHOD AND COMPUTER PROGRAM PRODUCT FORPROVIDING NOTIFICATIONS FROM A VIRTUAL DEVICE TO A DISCONNECTED PHYSICALDEVICE”; Ser. No. 14/160,904, filed Jan. 22, 2014, now U.S. Pat. No.9,380,523, entitled “SYSTEM, METHOD AND COMPUTER PROGRAM PRODUCT FORCONNECTING ROAMING MOBILE DEVICES TO A VIRTUAL DEVICE PLATFORM”; Ser.No. 14/160,946, filed Jan. 22, 2014, now U.S. Pat. No. 9,819,593,entitled “SYSTEM, METHOD AND COMPUTER PROGRAM PRODUCT PROVIDING BYPASSMECHANISMS FOR A VIRTUAL MOBILE DEVICE PLATFORM”; Ser. No. 14/161,069,filed Jan. 22, 2014, now U.S. Pat. No. 9,380,456, entitled “SYSTEM,METHOD AND COMPUTER PROGRAM PRODUCT FOR DYNAMICALLY SWITCHING OPERATINGSYSTEMS IN A VIRTUAL MOBILE DEVICE PLATFORM”; Ser. No. 14/161,083, filedJan. 22, 2014, now U.S. Pat. No. 9,697,629, entitled “SYSTEM, METHOD ANDCOMPUTER PROGRAM PRODUCT FOR USER PERFORMANCE AND DEVICE RESOLUTIONSETTINGS”; and Ser. No. 14/161,157, filed Jan. 22, 2014, now U.S. Pat.No. 9,667,703, entitled “SYSTEM, METHOD AND COMPUTER PROGRAM PRODUCT FORGENERATING REMOTE VIEWS IN A VIRTUAL MOBILE DEVICE PLATFORM.” Allapplications listed in this paragraph are incorporated by reference asif set forth herein in their entireties.

TECHNICAL FIELD

This disclosure relates generally to a virtual mobile device platformfor touch-enabled mobile devices. More particularly, embodimentsdisclosed herein relate to a system, method, and computer programproduct for capturing touch events for a virtual mobile device platform.

BACKGROUND OF THE RELATED ART

Today's mobile devices such as smart phones and tablets face uniquesecurity issues, some of which go hand in hand with mobility.Enterprises, military, and intelligence agencies (collectively referredto herein as “organizations”) are all grappling with their users' use ofmobile devices as many users are carrying out both business as well aspersonal activities on their mobile devices. This can be problematiceven if a Bring Your Own Device (“BYOD”) device policy is in place.

BYOD can raise serious security issues when a user's personal device isused to access both non-sensitive and sensitive (and sometimes risky)networks and/or services. For example, if an employee uses his personalsmartphone to access a company network and then loses that phone,untrusted parties could retrieve any unsecured data on the phone.Another type of security breach occurs when an employee leaves acompany, she does not have to give the company back her personal device,so company-owned applications, and other data may still be present onher personal device. A challenging but important task for organizationsthat utilize BYOD is to develop a policy that defines exactly whatsensitive company information needs to be protected and which employeesshould have access to this information, and then to educate allemployees on this policy. Commercial carriers are normally relied uponfor implementing the security requirements of an organization's BYODpolicy.

Because of Internet-based risks, some very risk-averse organizationsissue devices specifically for Internet use (this is termed“Inverse-BYOD”), providing unfiltered access to the Internet andreserving filtered, sensitive network data for use within a secured,private network. However, this means that a user likely has to carrymultiple devices (including one for his personal use) and organizationsdo not have a sure way of preventing the user from using his personalmobile device to communicate non-sensitive but company-relatedinformation. As such, organizations continue to search for solutionsthat allow mobile services to be delivered or shared within a singledevice, rather than having to issue their users multiple devices orseparate devices for their personal use and locking them into privatenetworks.

Finding viable solutions to handle mobile devices can be particularlychallenging for organizations that operate in high assurance computingenvironments. A high assurance computing environment is one thatprovides a certain level of assurance as to its behavior, useful inensuring a level of secrecy for classified information. For instance, ahigh assurance operating system may permit only certain certifiedapplications to access a particular portion of a memory on a devicewhere sensitive information is stored. However, this does not preventthe physical device itself to become suspect—how it was built, who hashandled it from manufacturing through use, how it is used by the user,etc. Moreover, the device could be physically accessed or otherwisecompromised in many ways. For instance, information stored or cached ona mobile device could be accessed while its owner is away (e.g., left onthe table at a restaurant or on their desk at work, stolen, or lost) orthe user may have downloaded an infected application or could be sent aninfected document via email or instant messaging, or accessed aninfected service.

Because a mobile device lives in a hostile world, securing the physicaldevice itself (e.g., via Tempest hardware, encrypted storage,biometrics, etc.) is not enough and can be very expensive to do athorough job. Even so, infiltration from any portion of the stack—fromthe chips to the software that is installed to the data the devicereceives—still leaves the device vulnerable to attacks from well-funded,motivated, adversaries. Attempts to provide the level of separationneeded within the actual device face many challenges, and at best arelikely to become a very expensive niche proposition in the overallcommercial mobility ecosystem.

In view of unique challenges in incorporating mobile devices such assmart phones and tablets into secure computing environments, there isroom for innovations and improvements.

SUMMARY OF THE DISCLOSURE

Embodiments disclosed herein provide a system, method, and computerprogram product for capturing touch events for a virtual mobile deviceplatform and relaying the captured touch events to the virtual mobiledevice platform while ensuring that movements and speed of touch eventsare accurately represented at the virtual mobile device platform.

In some embodiments, certain touch events are accumulated in a queue andrelayed to the virtual mobile device platform with timing information,enabling the virtual mobile device platform to accurately reconstructthe touch events.

Embodiments disclosed herein can provide many advantages. For example,in some embodiments, touch events, including touch movements, touchspeed, and gestures are relayed to the virtual mobile device platform insuch a way that the properties of the touch events are not changed bynetwork latencies.

These, and other, aspects of the disclosure will be better appreciatedand understood when considered in conjunction with the followingdescription and the accompanying drawings. It should be understood,however, that the following description, while indicating variousembodiments of the disclosure and numerous specific details thereof, isgiven by way of illustration and not of limitation. Many substitutions,modifications, additions, and/or rearrangements may be made within thescope of the disclosure without departing from the spirit thereof, andthe disclosure includes all such substitutions, modifications,additions, and/or rearrangements.

BRIEF DESCRIPTION OF THE DRAWINGS

The drawings accompanying and forming part of this specification areincluded to depict certain aspects of the disclosure. It should be notedthat the features illustrated in the drawings are not necessarily drawnto scale. A more complete understanding of the disclosure and theadvantages thereof may be acquired by referring to the followingdescription, taken in conjunction with the accompanying drawings inwhich like reference numbers indicate like features and wherein:

FIG. 1 depicts a diagrammatic representation of an example of an overallnetwork environment in which embodiments disclosed herein may beimplemented;

FIG. 2 depicts a diagrammatic representation of an example of a networkarchitecture according to one embodiment;

FIG. 3 depicts a diagrammatic representation of an example of a systemarchitecture according to one embodiment;

FIG. 4 depicts a diagrammatic representation of an example of virtualdevice containment and connections according to one embodiment;

FIG. 5 depicts a diagrammatic representation of an example of a channelbased device mapping architecture according to one embodiment; and

FIG. 6 depicts a diagrammatic representation of an example ofvirtualization server software architecture according to one embodiment.

FIG. 7 depicts a diagrammatic representation of an example of a seriesof touch events over time according to one embodiment.

FIG. 8 depicts a flowchart of a process for handling touch events at aclient device according to one embodiment.

FIG. 9 depicts a flowchart of a process for handling touch events at aserver according to one embodiment.

FIG. 10 depicts a flowchart of a process for handling touch events at aclient device, including invoking a secondary thread, according to oneembodiment.

FIG. 11 depicts a flowchart of a secondary thread for handling touchevents at a client device according to one embodiment.

FIG. 12 depicts a flowchart of a process for handling touch events at aclient device, where touch events are analyzed at the server, accordingto one embodiment.

FIG. 13 depicts a flowchart of a process for handling touch events at aserver, including invoking a secondary thread, according to oneembodiment.

FIG. 14 depicts a flowchart of a secondary thread for handling touchevents at a server according to one embodiment.

FIG. 15 depicts a flowchart of the dispatch subroutine shown in FIG. 13,according to one embodiment.

FIG. 16 depicts a flowchart of the dispatch subroutine shown in FIG. 14,according to one embodiment.

DETAILED DESCRIPTION

The disclosure and various features and advantageous details thereof areexplained more fully with reference to the exemplary, and thereforenon-limiting, embodiments illustrated in the accompanying drawings anddetailed in the following description. It should be understood, however,that the detailed description and the specific examples, whileindicating the preferred embodiments, are given by way of illustrationonly and not by way of limitation. Descriptions of known programmingtechniques, computer software, hardware, operating platforms andprotocols may be omitted so as not to unnecessarily obscure thedisclosure in detail. Various substitutions, modifications, additions,and/or rearrangements within the spirit and/or scope of the underlyinginventive concept will become apparent to those skilled in the art fromthis disclosure.

As described above, a mobile device lives in a hostile world and, assuch, securing the device itself may not be enough and/or possible.There is a desire to separate a physical device from applications thatrun on the device. Embodiments disclosed herein can remove theapplications and services, even much of the device's operatingenvironment from the hostile environment. Instead, these functions areprovided on protected hardware and software in a data center where theycan be managed, monitored, repaired, and deployed under the care ofinformation technology (IT) experts and administrators.

As illustrated in FIG. 1, embodiments disclosed herein can allow a userof mobile device 110 in network environment 100 to switch between usingpublic network services 130 and using private network services 140. Inparticular, the user may access public network services 130 via publicnetwork 120 such as the Internet over which non-sensitive informationmay be communicated. However, to access private network services 140, avirtualization cloud client application (referred to hereinafter as a“VC client application”) running on mobile device 110 connects to avirtualized device (e.g., virtual device 160A) hosted in virtualizationcloud 150 and brokers access to private network services 140 as well aslocal device functions.

Those skilled in the art will appreciate that local device functions mayvary depending upon the type of mobile device 110. For example, mobiledevice 110 can be a touchscreen smartphone with local device functionssuch as the touch screen, the dialer/phone network, camera, GlobalPositioning System (GPS), keyboard, speakers, microphone, and so on.Other examples of mobile device 110 may include touchscreen tablets andother touch-enabled mobile devices. As will be explained in furtherdetail below, such mobile device functions can be provided byembodiments disclosed herein on protected hardware and software invirtualization cloud 150 without adversely affecting the user'sexperience in interacting with mobile device 110, even if the usertravels frequently from one continent to another.

In some embodiments, multiple virtualized devices may be created for thesame physical device. For example, in FIG. 1, virtual device 160A andvirtual device 160B may be created for mobile device 110. This featureis further described below with reference to FIG. 2.

FIG. 2 depicts a diagrammatic representation of an example of a networkarchitecture according to one embodiment. In this example, system 200may include virtualization cloud 250 communicatively connected tovarious types of mobile devices 210A . . . 210N, 211, and 215. Mobiledevices 210A . . . 210N, 211, and 215 may represent different types ofactual touchscreen devices such as smartphones and tablets. Mobiledevices 210A . . . 210N, 211, and 215 may be owned by the same ordifferent entities (e.g., enterprises, users, etc.). Further, mobiledevices 210A . . . 210N, 211, and 215 may be programmed with differentoperating systems such as iOS, Android, and Windows.

Each of mobile devices 210A . . . 210N, 211, and 215 may have a VCclient application installed, for instance, by an administrator or ITpersonnel of system 200. In one embodiment, a VC client application maybe downloaded from an online device-specific app store.

In one embodiment, a VC client application may comprise software thatbrokers access to mobile devices' physical interfaces (e.g., soft andhard keyboards, touchscreen, GPS, camera, accelerometer, speakers,microphone, phone dialer, etc.) and Virtual Private Network (VPN)software that connects across a public network such as the Internet toservers in a virtualization cloud (e.g., virtualization cloud 150 ofFIG. 1) over encrypted network interfaces. Virtualization cloud 250 maybe an embodiment of virtualization cloud 150 described above withreference to FIG. 1.

Virtualization cloud 250 provides a hosted, networked, applicationenvironment. As a non-limiting example, in one embodiment,virtualization cloud 250 is configured as an Android applicationenvironment. As illustrated in FIG. 2, virtualization cloud 250 maycomprise host servers 255 and management domains 260, 270.

Host servers 255 may host application services. Private network services140 of FIG. 1 may be an embodiment of application services hosted byhost servers 255 of FIG. 2. In one embodiment, a plurality ofapplication services may execute on a collection of servers withextensions to support separation and segmentation of a core server.

Each management domain may comprise a collection of virtualized devices,hosted on one or more server machines. In an Android applicationenvironment, such virtualized devices may be referred to as virtualAndroid devices. From another perspective, a management domain is madeup of a collection of server machines providing services to a largenumber of users. A collection of server machines may host virtualdevices for these users and provide access to the applications andservices via a remote client interface. In some embodiments, amanagement domain may further comprise a private application “store” forhosting installable approved enterprise applications particular to thatmanagement domain. In some embodiments, a user can have access to one ormore “virtual devices” hosted in the management domain, each virtualdevice containing a core set of applications such as an enterpriseaddress book, mail, calendar, web browser, etc. in addition to anypreinstalled enterprise applications.

As FIG. 2 exemplifies, each mobile device (e.g., mobile device 210A,mobile device 211, mobile device 215, etc.) has a connection (via a VCclient application installed thereon) to one or more server machinesthat host their virtual device(s) in a virtualization cloud (e.g.,virtualization cloud 250). As explained below, the applications andtheir data located within a single virtual device are completelyinaccessible to the applications and data in another virtual device. Theapplications are limited to the network services within their managementdomain and thus cannot access the network services provided in othermanagement domains. For example, mobile device 210A may have a firstvirtual device hosted on a first server machine in management domain 260and a second virtual device hosted on a second server machine inmanagement domain 270. However, the applications and their data locatedwithin the first virtual device in management domain 260 are completelyinaccessible to the applications and data within the second virtualdevice in management domain 270.

In some embodiments, for each connection to an application servicehosted in the virtualization cloud, a different instance of the VCclient application is started on the mobile device. For example, a firstVC client instance may be started on mobile device 210A to accessmanagement domain 260 and a second VC client instance may be started onmobile device 210A to access management domain 270. All of theapplications running in a particular management domain for a particularuser will be accessed through the corresponding VC client applicationrunning on the mobile device. Additionally, the VC client application'sremote connection software running in a mobile device does not exposeapplication generated events running natively within the mobile deviceto the applications running in their virtual device(s), unless they arespecific events from the devices brokered by the VC client application.In this way, rather than executing mobile applications in an actualdevice (e.g., mobile device 210A, etc.), the applications are runremotely in a virtualization cloud (e.g., virtualization cloud 250)under the watchful eyes of an enterprise's systems and networkmanagement tools and their administrators, separate from each other andfrom the consumer/Internet applications and data.

Turning now to FIG. 3, which depicts a diagrammatic representation of anexample of a system architecture according to one embodiment. In thisexample, system 300 comprises virtualization cloud 350 communicativelyconnected to private network services 340 and various types of mobiledevices 380.

Mobile devices 380 may operate in a distributed computing environmentand may operate on various types of operating systems. Similar to mobiledevices 110, 210A . . . 210N, 211, 215 described above, each of mobiledevices 380 may have a VC client application installed thereon. Theinstalled VC client application may be device-specific. For example,each of Android tablets 381 may have an Android tablet client, each ofAndroid phones 383 may have an Android phone client, each of iOS iPhones385 may have an iOS iPhone client, each of iOS iPads 387 may have an iOSiPad client, and each of Windows tablets 389 may have a Windows tabletclient.

Private network services 340 may comprise enterprise services forprivate network 345. Non-limiting examples of private network services340 may include IT management 301, enterprise applications 303, intranet305, document storage 307, active directory 309, and email exchange 311.These services are known to those skilled in the art and thus are notfurther described herein.

Virtualization cloud 350 may comprise a plurality of system components,including storage 351, controller 353, virtual device manager 355,notification event service 357, virtual devices 359, and authentication361. These system components may run on a single server machine orseparately on multiple server machines. For the sake of convenience, andnot of limitation, FIG. 3 shows each system component running onmultiple physical servers.

More specifically, virtual device manager 355 (an application thatmanages virtual devices) may send a command to controller 353 to createa virtual device. In one embodiment, controller 353 may implement theOpenStack open source cloud computing fabric controller. OpenStack isknown to those skilled in the art and thus is not further describedherein for the sake of brevity.

In response to the command from virtual device manager 355, controller353 may first select a golden image, and any applications associatedwith the golden image. A golden image refers to a virtual machine thatwas built as a template and that usually contains little, if any, morethan the base operating system. A golden image may also be referred toas a gold image, clone image, master image, or base image. To create agolden image, an administrator first sets up the computing environmentexactly the way it is needed and then saves the disk image as a patternfor making more copies. The use of golden images can save time andensure consistency by eliminating the need for repetitive configurationchanges and performance tweaks. This approach can be compared toautomated replication, which requires a configuration management tool tobuild new images on demand. In a self-service provisioning environment,a collection of golden images may be referred to as a golden repository,gold catalog, or golden image library.

Using the selected golden image, controller 353 may create virtualdevice instance 359 and associate with it a storage location in storageserver 351. Storage server 351 holds the persisted, physical storage ofeach virtual device created by controller 353. Controller 353 may thenreturn the information on virtual device instance 359 to virtual devicemanager 355.

In some embodiments, each user is assigned one or more virtual devicesin one or more management domains when they are provisioned. Thesevirtual “devices” contain applications, their settings and deviceconfiguration, as well as any data created locally in the device for theuser by any installed applications. The images are maintained in networkstorage servers (e.g., storage servers 351) within the correspondingmanagement domain(s). In some embodiments, as part of this image, theuser is provided an emulated “flash” drive for app storage. The imagescan also be configured to permit access to external enterprise storage.In some embodiments, storage servers may utilize redundant storage toprotect data from failures.

In some embodiments, authentication servers 361 may be configured toprovide authentication and session management services. For example,when a user (via a VC client application running on a mobile device thatthe user is using) attempts to access an enterprise application,authentication server 361 may connect to one or more directory servers(e.g., active directory 309) to authenticate the user's access tovirtual device(s) where the enterprise application can be run and toprovision the user with one or more virtual devices. After the userauthenticates, authentication server 361 may direct virtual devicemanager 355 to locate a device server that will host the user's virtualdevice 359. In some embodiments, it may ensure that virtual device 359is “powered on” as well as initiate the initial session negotiation (viaestablishment of security tokens) between the mobile device running theVC client application and virtual device 359.

Those skilled in the art will appreciate that a virtual “device” is anot really a device—it is a remote execution environment for all of theservices and applications that make up a device. There are (at least)two main classes of device servers, “bare metal” device servers andvirtual machine device servers. There are some functional, deployment,and cost differences between these types and so ultimatelyimplementation and market demand will determine their allocation andavailability.

The bare metal device servers are made up of a large number ofrelatively small processing units similar in performance and scale tothe processing units of actual mobile devices. Each virtual deviceinstance can run on its own physical central processing unit (“CPU”)hardware. In some embodiments, a modified version of the Simple Protocolfor Independent Computing Environments (SPICE) protocol server softwareexecutes directly in the operating system (OS) on each of theseinstances to provide remote access.

SPICE is an open source protocol and implementation developed by Red Hatthat provides remote access to virtual desktops. SPICE has awell-documented protocol that includes the ability to create new“channels” for different remote services. Embodiments extend the SPICEprotocol to provide remote access to virtual devices and to brokeraccess to the sensors of the real (physical) devices.

Virtual machine device servers are server class machines that can befound in the server market today. On the virtual machine device servers,each virtual “device” executes in its own virtual machine on a speciallyconfigured Linux device server. In some embodiments, a device server maybe configured to provide Transport Layer Security (TLS) and VPNencryption, virtual device instrumentation/auditing, integrity checksand anti-virus from virtualization layer, system-side applicationmanagement, learning of ‘normal’ behavior, protocol aware firewall,server-side TPM attestation, SELinux-based virtual device separation,VPN service for applications in the virtual devices, and network proxyfor traffic monitoring. Some of these features are further explainedbelow.

In some embodiments, virtual devices hosting Android (or SecurityEnhancements for Android (SEAndroid)) may be created for each user usingLinux's Kernel-based Virtual Machine (KVM) and Quick EMUlator (QEMU).

KVM refers to a kernel-resident virtual machine infrastructure builtdirectly into Linux as opposed to other virtualization techniques thatrun under Linux as a process. This architecture helps KVM operate veryefficiently within Linux. KVM provides completely separate virtualenvironments for Android devices implementing embodiments disclosedherein. KVM itself does not provide any hardware emulation or remotingcapabilities.

QEMU is a user-space emulator that works with KVM to provide thehardware emulation. While QEMU can provide processor instructionemulation, embodiments employ it only for emulating hardware for thevirtual device. For example, some embodiments use or provide emulatedhardware for touch screen/display, memory/storage, audio, cameras,sensors, bypass, and networking.

Linux and KVM provide the isolation between each user and theapplications that they run. It is not possible to communicate directlybetween the application components and services in these separatevirtual containers. Thus, each “device”, while sharing physical serverhardware, runs independently and is separate from the others, asdepicted in FIG. 4.

FIG. 4 depicts a diagrammatic representation of an example of virtualdevice containment and connections according to one embodiment. In thisexample, virtualization cloud 400 may comprise management domain 410(Office 1) and management domain 420 (Office 2).

Management domain 410 and management domain 420 may be hosted on deviceservers connected to management network 450 which provides a pluralityof network services such as application management services 451A, 451B,application behavioral monitoring services 453A, 453B, user behavioralbiometric services 455A, 455B, and audit services 457A, 457B.

Management domain 410 may comprise a plurality of virtual devices 459X,459Y, 459Z implemented using OpenStack infrastructure 470A on TrustedPlatform Module (TPM)-based attestation 460A. Each of the plurality ofvirtual devices 459X, 459Y, 459Z may include an agent of managementnetwork 450 (e.g., agents 495X, 495Y, 495Z, respectively). In someembodiments, the agent may be referred to as a mobile device managementand mobile application management (MDM/MAM) agent. In this example,management domain 410 may further comprise VPN service 456A and storageservice 458A.

Management domain 420 may comprise a plurality of virtual devices 429X,429Y, 429Z implemented using OpenStack infrastructure 470B on TPM-basedattestation 460B. Each of the plurality of virtual devices 429X, 429Y,429Z may include an agent of management network 450 (e.g., agents 492X,492Y, 492Z, respectively). In this example, management domain 420 mayfurther comprise MDM server 452, MAM server 454, VPN service 456B, andstorage service 458B.

As illustrated in FIG. 4, each of the plurality of virtual devices 459X,459Y, 459Z in management domain 410 and each of the plurality of virtualdevices 429X, 429Y, 429Z in management domain 420 has a read onlypartition and its own KVM/QEMU in a particular SELinux domain (e.g.,read only partition 475X and KVM/QEMU 473X in SELinux domain 471X, readonly partition 475Y and KVM/QEMU 473Y in SELinux domain 471Y, read onlypartition 475Z and KVM/QEMU 473Z in SELinux domain 471Z, read onlypartition 476X and KVM/QEMU 474X in SELinux domain 472X, read onlypartition 476Y and KVM/QEMU 474Y in SELinux domain 472Y, read onlypartition 476Z and KVM/QEMU 474Z in SELinux domain 472Z).

In the example of FIG. 4, the virtual devices are implemented asSEAndroid virtual devices. SEAndroid may provide benefits such asprivileged daemon protection, application isolation, middlewarecontrols, instrumentation and auditing, application install protection,limit application access to sensors, ‘untrusted’ application sandboxing,read-only core OS partition, centralized patching, and MDM/MAM controls.

In some embodiments, virtual devices can be migrated between deviceservers by administrative commands (via management network 450), usingtools to automate the balancing of load across multiple device serversor based on geographical location.

Each of these virtual devices may be connected to a physical mobiledevice (e.g., smartphone 430, tablet 440, etc.). In some embodiments, aVC client application running on the physical device may be configuredto provide remote two factor authentication, remote signing anddecryption, TLS encryption for data in transit, GPS-based accesspolicies, attributes exposed for MDM integration, mechanisms to improveattestation, and/or integration with the mobile device's Mobile TrustedModule (MTM).

When a user is added to a management domain, they are provisioned with avirtual device of a particular type. Similarly, when a user is removed,their virtual devices must be deactivated and their “parts” archived orreclaimed. A separate management server is used by administrators tomanage the lifecycle of devices and users of a virtualization cloud(e.g., virtualization cloud 150, virtualization cloud 250,virtualization cloud 350, virtualization cloud 400, etc., collectivelyreferred to hereinafter as the “VC system”). In some embodiments,provisioning services permit administrators to define device “types”(templates) and configurations and assign them to users depending uponthe role or duty.

In some embodiment, the management of the VC system and the virtualdevices can be controlled through a management policy system. Servers,storage, and virtual devices can be associated with hierarchicallyarranged policy containers. Policies and access to components can becontrolled through these containers and their position in the hierarchy.In some embodiment, these policy containers may be referred to as policydomains and can be used to allocate and delegate control to multipleadministration management domains.

For example, consider a hosted VC environment. A hosting partner wishesto support multiple enterprise customers in a single installation. Atthe same time, they would like to delegate much of the management totheir customers. They may choose to create a single policy domain thatcontains shared resources such as common virtual device images, commondevice storage, and a shared pool of device servers. For each newcustomer, they create a sub-domain and grant administrative access tothe customers' administrators for their respective sub-domain. Inaddition, they create a policy in the root domain that all resources areaccessible to the sub-domains. The customers' administrators can nowcreate assets (new device image templates, users, administrators,groups) within their own sub-domain. They, in turn, can create their ownsub-domains and assign assets, users, groups, administrators, etc. tothose sub-domains as well as policies to determine how resources can beinherited from the companies' sub-domain.

If one of these customers wants dedicated server resources to run thevirtual devices or to maintain their storage, the hosting partner canadd device server and storage server resources to their sub-domain(s)and thus only their virtual devices will be running or be saved on thoseserver assets. Similarly, those systems might have different networkingcharacteristics that would let them share a VPN connection to theenterprise as opposed to configuring a VPN within each of the virtualdevices.

This organization can also be beneficial to enterprises that need todelegate management functions to different departments within theirenterprise yet want to control and maintain the overall infrastructurecentrally.

When migrating a user between two templates, the VC system can supportintelligent upgrading, including:

-   -   Scheduling specific times for upgrades to occur.    -   Roll back to a previous device template if an error occurs.    -   Partial, incremental upgrade processes across a user population.    -   Detection of whether a user is active on a virtual device before        enacting the upgrade.    -   Graceful shut down of a virtual device for which an upgrade is        being forced.

As a non-limiting example, in some embodiment, a provisioning andmanagement server for the virtual machine device servers described abovecan be built on top of a virtual datacenter management platform such asOVirt, OpenStack, or the like. OVirt and OpenStack are known to thoseskilled in the art and thus are not further described herein. OVirtprovides the underlying data services for managing and accessing virtualmachines. The VC system provides an abstraction interface that hidesmuch of the complexity of the underlying virtual datacenter managementplatform when trying to manage multiple management domains within asingle system. In some embodiments, SPICE may be integrated into thevirtual datacenter management platform, allowing users to connect tovirtual machines through SPICE.

In some embodiments, an administrator might want to allow users toaccess a mobile virtual device without a persist state of the virtualdevice beyond a given user's session. In this case, the virtual devicemay be deleted when the session ends. In some embodiments, the virtualdevice may optionally warn the user that the virtual device is operatingon a kiosk mode when the user logs in, and delete the virtual devicewhen the user logs out. Essentially, the kiosk mode provides a ‘fresh’virtual device based on a specified template each time a user logs in.

In a variant of the kiosk mode, a virtual device can be set tosynchronize certain enterprise data (e.g., recent email) when the userlogs into the kiosk mode device, but the virtual device is still deletedwhen the user logs out. In this way, any new enterprise data is placedback into the enterprise applications that should own each respectivedata type. This allows the user to move between server node clusters(e.g., moving between countries) without concern about moving orsynchronizing virtual device state between the different servers.

The VC system may support additional modes of operation. For instance, apublished app mode may enable an organization to offer specificapplications in remote ‘containers’ to large user populations. Anexample would be a bank using the published app mode to make an onlinebanking application available to its customers, while hosting thatonline banking application in their own data centers on their own lockeddown OS image.

In such a published app mode, the end client application icon can becustomized to enable white labeling. For example, when the user logs in,the published application is already open and in focus. When the userquits the application, the remote connection closes. In someembodiments, the published app mode can be coupled with the kiosk modedescribed above such so that the virtual device does not have a persiststate.

In some embodiments, an organization may wish to provision a virtualdevice (whether a full device, kiosk mode, published app, etc.) to aperson not employed by that organization, and the user need onlydownload a VC client application or add the account to their existing VCclient application on their mobile device(s).

In some embodiments, an organization may wish to provision one or morevirtual devices to one or more employees at a partner organization. Inthis case, the publishing organization can liaise with the consumingorganization to add a VC client application and/or set of authenticationsettings to the consuming organization. One of the advantages of thisapproach is that the publishing organization can leverage the userprovisioning and authentication mechanisms of the consumingorganization. For example, access to the VC client application canbecome a setting in the consuming organization's active directory, andusers in the consuming organization must already have authenticated tothe consuming organization in order to have access to the publishingorganization's applications/virtual devices.

In this scenario, doing two remoting steps would add latency andcomplexity to the VC system. To avoid this, when the user connects tothe publishing organization's virtual device, the VC client applicationon the user's physical device can connect to the publishingorganization's VC servers via a bypass channel in the VC server of theconsuming organization.

As described above, SPICE can create new “channels” for different remoteservices. Different types of data can be communicated between a mobiledevice running a VC client application and a virtual device running inthe VC system via different SPICE channels. These SPICE channels aremapped to virtual input/output channels.

FIG. 5 depicts a diagrammatic representation of an example of channelbased device mapping architecture 500 according to one embodiment. Inthis example, data (e.g., display data, audio data, location data, etc.)may be communicated from a mobile device (e.g., client side 510) viavarious SPICE channels (e.g., main channel 511, display channel 513,audio record channel 515, audio playback channel 517, cloud channel 519,Call Admission Control (CAC)/Signaling Controller (SC) channel 521,etc.) to a server in the VC system (e.g., server side 550). Channelbased device mapping architecture 500 may include a virtual devicemapping module embodied on a non-transitory computer readable medium andconfigured for mapping the incoming data to appropriate virtual devicecomponent (e.g., internal component 551, proprietary video graphicadapter (VGA) 553, etc.) and/or virtual input/output channels 555, eachassociated with a particular virtual driver. This is further describedbelow with reference to FIG. 6.

FIG. 6 depicts a diagrammatic representation of an example ofvirtualization server software architecture according to one embodiment.As a non-limiting example, virtualization server software architecture600 may implement a modified version of Android OS.

As illustrated in FIG. 6, virtualization server software architecture600 may comprise a plurality of software components. At its core is aLinux kernel with specialized core drivers 630 to abstract the hardwarelayer from the application runtimes. Channel data 610 are received intoa virtual device's KVM/QEMU 620, mapped via virtual input/outputchannels 639, and handled by corresponding virtual device drivers (e.g.,display driver 631, universal serial bus (USB) driver 633, disk driver635, binder/inter-process communication (IPC) driver 637, camera driver632, input driver 634, power management 636, and network driver 638,etc.). These “virtual” device drivers replace the drivers for a realdevice and communicate using QEMU and the SPICE protocol with a VCclient application executing on the mobile device for access to the realdevices and the services they provide.

Virtualization server software architecture 600 may further comprise acollection of libraries for accessing data, working with text andgraphics, encryption and communication, and the underlying OS. In thecase of Android OS, each virtual device session includes a fullcomplement of Android's application framework, libraries, runtime, andapplications. However, some kernel-based services provided within avirtual device server are modified. For example, power managementservices are simulated and significantly altered as battery support isnot an issue in a virtual device. User interface (UI) indicators forbatteries and other elements not applicable to the virtual device can bemade to reflect the values of the client device.

As another example, applications running in a virtual device do not usethe local device's WiFi or data network. Instead, they use the InternetProtocol (IP)-based network services provided by the virtual deviceservers. In some embodiments, an “always-on” network interface may beprovided to the applications. WiFi and data connectivity managementapplications the user may install in the virtual device may have norelevance.

Virtualization server software architecture 600 may include additionalvirtual drivers not shown in FIG. 6. Many of the virtual drivers maycommunicate with a VC client application running on a mobile deviceusing extensions to the SPICE protocol. Some are designed to improveperformance whereas others provide access to features expected in amobile device. Some example virtual drivers are further described below.

Virtual sensors driver—provides access to the remote client's sensordevices such as the GPS, the gyroscope, the accelerometer, a compass,battery level, WiFi signal strength, and 3G/4G signal strength. Othersensor types can be added as needed.

When an application requests access to a sensor such as the GPS, thesensors driver sends a device message that results in a sensor requestbeing sent to the remote client. The remote client application thenmakes a similar request to the physical device and begins forwardingsensor data back to the sensor driver as the sensor produces data. Whenthe application no longer needs the sensor information, a close requestis sent back to the client where it then stops monitoring the specifiedsensor.

Some sensors, such as the GPS, can draw significant battery power whilerunning. To prevent unnecessary battery drain, the VC client applicationrunning on the physical mobile device can request that the GPS on thelocal mobile device be turned on or off based on the requirements ofapplications running on the virtual device in the VC system.

Some sensors such as the accelerometer may change values veryfrequently. The VC client application can be configured to sample andrelay accelerometer values from the local physical device based onattributes and requirements of the app running on the virtual device inthe VC system as well as the performance of the network connectionbetween the local and virtual devices (higher network latency and loweravailable bandwidth result in fewer sensor values being communicated).

A specific example of this is in how the VC system synchronizes theorientation of the remote virtual device to the orientation of the localdevice by continually monitoring and relaying orientation change eventson the accelerometer on the local device, while not relaying every minorrotation of the device all the time even if the application on theremote virtual device is not monitoring the accelerometer data.

Additional sensors that the VC system can remote from the local deviceto the virtual device may include the network type, network signalstrength, battery charge remaining, light sensor (used for screendiming), Bluetooth, peripheral device connectivity and the state of anylocal payment credential.

Virtual touchscreen driver—supports remoting of multi-touch actions andalso gestures. Multi-touch gestures can be used for zooming, rotatingand other similar operations. In one embodiment, the SPICE mouse channelmay be modified for this purpose. In some embodiments, a designatedchannel is used for this purpose.

Audio and video bypass driver—improves the performance of audio andvideo processing for both the VC server and the VC client. Whileembodiments can work without bypass, there is a CPU cost on both theclient and the server when using the internal video processing of thehost operating system (e.g., Android). To this end, modified mediaframework 645 is provided to replace audio and video players that camewith the OS with special players that implement the bypass functions.For example, when an application requests to play a video using theAndroid video player (either full-screen or embedded), the bypass videoplayer captures either the video data or an Universal Resource Locator(URL) that points to an address where the actual video file resides, andpasses it via the bypass driver to the remote client. The client thenspawns a local video player and plays the video stream. In the case ofnetwork video sources, the entire stream can be handled outside of thevirtual device via a network proxy.

Audio bypass works much like video bypass. The audio player is replacedto provide proxy access to audio data in the client.

Virtual camera driver—remotes a camera using a combination of a virtualcamera device driver and modifications to the camera functions in themedia framework. When the camera activity or fragment is loaded in thevirtual device, the modified camera viewer and virtual camera driversends a request to the client to bring up the camera. Once a picture istaken, the picture or video is sent to the virtual device server whereit can be placed in the flash storage of the virtual device or can bedelivered to an anti-virus scanner and then placed in enterprisestorage.

Virtual display driver—optimizes delivery of graphics to a remoteclient. More specifically, the graphics layer can be instrumented togenerate messages via a virtual display driver instead of writingdirectly to a frame buffer. In some embodiments, surface manager 641 inlibraries 640 is implemented to handle partial updates to the Androiddisplay. In some embodiments, surface manager 641 may work inconjunction with graphics API 643 to provide acceleration for variouscommands issued by applications and the Android OS.

These and other virtual drivers support remote access for applications660 running on application frameworks 650 in the virtual device.Operation of the virtual device, including processes associated withapplications 660, as well as user behaviors can be monitored via variouscomponents in application frameworks 650 (e.g., resource manager 651,location manger 653, agent 655, notification manager 657, activitymanager 659, content providers 661, telephony manager 663, packagemanager 665, window manager 667, system view 669, Extensible Messagingand Presence Protocol (XMPP) communications service 671, etc.), some ofwhich will be further described below.

One concern when implementing a virtual mobile device platform fortouch-enabled mobile devices relates to network latency. When providingremote access to an operating system that relies on touch actions,network latencies can cause strange behaviors in replaying touchactions. Several operating systems designed for touch inputs rely onalgorithms to take a collection of touch points over time and convertthat into a path or vector for the operating system. Capturing touchevents on a mobile device platform and sending the touch events over acommunication network to a remote server for accurate or even reasonablyaccurate reproduction can result in a poor user experience if the eventsare not time stamped and grouped by the speed of the gesture.

When touch events are being relayed across a network, varying networklatencies can cause the time gaps between these touch events to bechanged. This can result in strange user experience behaviors, such asscrolling events bouncing back to where the user started the scroll,causing significant frustration to the end user. FIG. 7 is a diagramdepicting a representation of an exemplary series of touch data pointsover time. A first set 710 of data points represent six touch eventssensed by a touch screen on a mobile device. Each data point in set 710may be comprised of any type of touch event, including, for example, atouch down, a touch up, a touch move, or a cancel.

FIG. 7 also illustrates the elapsed time (T1, T2, T3, T4, T5) betweeneach data point. In the case of a mobile device running applicationslocally, latency between the touch screen and the processor of themobile device is negligible. However, when touch events are beingrelayed across a network, network latencies can cause the time gapsbetween touch event data points to change. When the time gaps change,the remote virtual mobile device may interpret the touch datadifferently from the way it was generated by the user. The second set720 of data points represents the same set 710 of data points, afterbeing transferred over a network. As shown, the gaps between the datapoints have changed, due to network latencies. As a result, the touchdata received by the remote virtual mobile device does not match thetouch data generated at the mobile device. Further, if the data pointsrepresent a swipe, movement, gesture, etc., it is likely that thatswipe, movement, or gesture will not be interpreted properly at theremote virtual device.

The third set 730 of data points shown in FIG. 7 represent a desiredreconstruction of set 710 of data points at the remote virtual mobiledevice. The embodiments described below illustrate examples oftechniques for relaying user touch events from a mobile device, over anetwork, to a remote virtual mobile device, while maintaining therelative timing between the touch event data points, as illustrated byset 730 of data points.

Touch screen inputs can be classified as several touch events. A touchdown event occurs when the touch screen is touched by a user. A touchmove event occurs as user moves their finger across the screen. A touchup event occurs when a user raises their finger from the screen. Acancel touch event occurs when a user moves their finger past the edgeof the screen. A cancel touch event can also occur if the phone isinterrupted by another process, such as receiving a call, etc. Inaddition to the types of touch events, a touch screen can also capturemultiple touch pointers. Each finger that touches the touch screen isrepresented as a touch pointer. For example, if a user touches thescreen with three fingers, then the touch event will be reported ashaving three pointers.

The techniques described below take into account the types of touchevents captured, the number of touch pointers, and the timing (andtherefore the speed) of the touch events and accurately relays them to aremote virtual mobile device. This enables the client application tocapture rapid finger movements as gestures and relay them as paths tothe remote virtual device, ensuring that the user's finger ‘momentum’ isaccurately captured and operations such as scrolling or gestures arecompleted successfully.

FIG. 8 depicts a flowchart of a process for handling touch events at aclient device according to one embodiment. In this example, the touchevents and speed of touch events are analyzed at the client device. Inother examples described below, the touch events and speed of touchevents are analyzed at the remote server. Generally, the processdepicted in FIG. 8, depending on various parameters, either sends touchevent data to the server, or accumulations touch event data at theclient device for later transmission to the server. At the server, thetouch event data is reconstructed to closely match the touch events ascaptured at the client device.

In the example shown in FIG. 8, touch event data is either accumulatedin a queue or sent to a server based on the following rules. If a touchevent has two or more touch pointers, the touch event is forwarded tothe server immediately. If a touch event is a touch down event, thetouch event is accumulated is a queue and not immediately forwarded tothe server. If the touch event is a touch move event, the touch event isanalyzed for speed with respect with the previous touch event. If thespeed is slower than a given speed constant, all the accumulated eventsin the queue are forwarded to the server immediately. If the speed isgreater than the given speed constant, then the touch event isaccumulated in the queue and not immediately forwarded to the server. Ifthe touch event is a touch up event, all the accumulated events in thequeue are forwarded to the server immediately. Touch event data that issent from the queue to the server includes the touch event type and thetime delta between subsequent touch events.

The process depicted in FIG. 8 begins at block 810, where a touch eventis captured by the touch screen of a mobile device. At step 812, theprocess determines whether two or more touch pointers were captured. Ifso, the process proceed to step 814 where the touch event is added tothe queue. The touch event data accumulated in the queue is thenforwarded to the server, and the queue is cleared. The process thenwaits for the next touch event (step 810). If only one touch pointer iscaptured, the process determines if the touch event was a touch downevent (step 816). If so, the touch event is added to the queue (step818), and the process waits for the next touch event (step 810). If thetouch event was not a touch down, the process determines if the touchevent was a touch up event (step 820). If so, the process proceed tostep 814 where the touch event is added to the queue. The touch eventdata accumulated in the queue is then forwarded to the server, and thequeue is cleared. The process then waits for the next touch event (step810).

If the touch event was not a touch up (as determined at step 820), theprocess assumes that the event is a touch move, and analyzes the speedof the touch move (step 822), relative to the previous touch event. Inone example, the speed of the event is determined based on the time ofthe current touch event, the time of the previous touch event, and thedistance between the events on the screen. The speed is calculated bydividing the determined distance by the time between the two events.Once the speed is determined, the process determines whether thecalculated speed is less than a threshold speed (step 824). The value ofthe threshold speed can be a constant chosen based on various factors,as one skilled in the art would understand. If the speed is less thanthe threshold, the process proceeds to step 814 where the touch event isadded to the queue. The touch event data accumulated in the queue isthen forwarded to the server, and the queue is cleared. If the speed isgreater than the threshold, the process proceeds to step 818 where thetouch event is added to the queue.

FIG. 9 depicts a flowchart of a process for handling touch events at aserver according to one embodiment. At step 910, a touch event messageis received from the client. The touch event message includesinformation relating to all of the events in the queue that wereforwarded to the server. The information includes the type of each touchevent, as well as timing information. At step 912, variable N is set toequal the number of touch events in the received touch event message. Aloop counter K is set to zero.

At step 914, the process determines if the counter K is greater than orequal to the number of touch events in the received touch event message.If not, event[K] is dispatched to the software stack (step 916). Forexample, on the first pass of the loop (K=1), information about thefirst touch event in the queue is sent to the software stack. At step918, the process sleeps for a time equal to the duration between theevent[K] and the next event[K+1]. At step 920, the loop counter K isincremented by one, and the process proceeds again to step 914. As theprocess proceeds through the loop formed by steps 914, 916, 918, and920, all of the data points in the queue of the captured touch events atthe client are reconstructed. Referring back to FIG. 7, by dispatchingsubsequent events and sleeping between dispatches, the loop accuratelyreconstructs the data points (like the set 730 of data points), whichwill closely match the set 710 of data points collected at the clientdevice. At the end of the loop (when counter K is greater than or equalto the number of events in the touch event message), the processproceeds to step 910, and waits for the next touch event message.

Note that the exemplary processes illustrated in FIGS. 8 and 9 (as wellas the following examples) are merely examples. In other examples, theillustrated steps can be performed in a different order, or some stepscan be performed simultaneously, as desired.

The processes depicted in FIGS. 8 and 9 are adequate for the most commoncircumstances, except for the case when a user triggers a touch downevent without a subsequent touch move or touch up events. In thatscenario, the algorithm illustrated in FIG. 8 will hold the touch downevent in the queue indefinitely until the user moves their finger alittle bit or lifts their finger from the touch sensor. To overcome thislimitation, in one embodiment, a secondary thread is created whosepurpose is to dispatch accumulated events that have not been sentbecause the user has not moved their finger or because the user has beenmoving their finger across the touch sensor too fast, for too long.

FIG. 10 depicts a flowchart of a process for handling touch events at aclient device, including invoking a secondary thread under certaincircumstances, according to one embodiment. FIG. 11 depicts a flowchartof the secondary thread invoked by the process depicted in FIG. 10.Generally, one goal of the processes shown in FIGS. 10 and 11 is todispatch events accumulated in the queue when the process wouldotherwise pause, while waiting for the user to move a finger, forexample. Note that, with two threads operating at the same time, itdesired that the threads stay synced and operate correctly under allcircumstances. One embodiment for accomplishing this is to create a lockobject. When one thread acquires the lock, the other thread is preventedfrom also acquiring the lock, until it is released. This forces the twothreads to stay synced and work for all circumstances.

The process depicted in FIG. 10 begins at block 1008 where a lock objectis created. The secondary thread (FIG. 11) is also created and started.At step 1010, a touch event is captured by the touch screen of theclient device. Once a touch event is captured, the first thread acquireslock (step 1012). This prevents the second thread from moving past theacquired lock block and prematurely forwarding the queue to the server.At step 1014, the process determines whether two or more touch pointerswere captured in the touch event. If so, the process proceed to step1016 where the touch event is added to the queue. The touch event dataaccumulated in the queue is then forwarded to the server, the queue iscleared, and the lock is released. The process then waits for the nexttouch event (step 1010). If only one touch pointer is captured (asdetermined at step 1014), the process determines if the touch event wasa touch down event (step 1018). If so, the touch event is added to thequeue (step 1020), the lock is released, and a wake up signal is sent tothe secondary thread. The secondary thread will ensure that touch eventsare not unduly held up (described below). The process then waits for thenext touch event (step 1010).

If the touch event was not a touch down, the process determines if thetouch event was a touch up event (step 1022). If so, the process proceedto step 1016 where the touch event is added to the queue. The touchevent data accumulated in the queue is then forwarded to the server, thequeue is cleared, and the lock is released. The process then waits forthe next touch event (step 1010).

If the touch event was not a touch up, the process assumes that theevent is a touch move, and analyzes the speed of the touch move (step1024), relative to the previous touch event. Once the speed isdetermined (for example, using the technique described above withrespect to FIG. 8), the process determines whether the calculated speedis less than a threshold speed (step 1026). If the speed is less thanthe threshold, the process proceeds to step 1016, where the touch eventis added to the queue. The touch event data accumulated in the queue isthen forwarded to the server, the queue is cleared, and the lock isreleased. The process then waits for the next touch event (step 1010).If the speed is greater than the threshold, the touch event is added tothe queue (step 1020), the lock is released, and a wake up signal issent to the secondary thread. The process then waits for the next touchevent (step 1010).

As described above with respect to FIG. 10, when a touch event is addedto the queue at step 1020, the secondary thread (FIG. 11) receives awake up signal. As shown in FIG. 11, at step 1110, the process waits forthe wake up signal. When a wake up signal is received (step 1112), thethread sleeps for K milliseconds (step 1114), where K is a constantselected as an acceptable delay between subsequent touch events, as oneskilled in the art would understand. After K milliseconds have passed,the secondary thread acquires lock (step 1116). If, for some reason, theprimary thread (FIG. 10) has already acquired lock, the secondary threadwill halt until the primary thread releases lock. At step 1118, theprocess determines the number of events in the queue. If the number ofevents in the queue (step 1120) is zero (i.e., there are no events inthe queue), the secondary thread releases lock (step 1122) and waits foranother wake up signal. If the number of events in the queue (step 1124)is one, the queue is forwarded to the server (step 1126), the queue iscleared (step 1128), lock is released (step 1122), and the secondarythread waits for another wake up signal (step 1110).

If the number of events in the queue is greater than 1, the processdetermines whether the last event was a touch up event (step 1130). Ifthe last event was a touch up event, the secondary thread releases lock(step 1132) and waits for the next wake up signal (step 1110). Note thatthe process releases lock on a touch up event since the primary threadwill cause the queue to be forwarded to the server (step 1016). If thelast event was not a touch up event, the process determines the timeelapsed since the first event in the queue (step 1134). In other words,the process determines how long touch events have been captured andstored in the queue, but not forwarded to the server. At step 1136, theprocess determines if the time elapsed is greater than a maximum holdtime. The maximum hold time has a value chosen as the maximum acceptabletime for touch data to be held in the queue, as one skilled in the artwould understand. If the maximum hold time has been exceeded, the queueis forwarded to the server (step 1126), the queue is cleared (step1128), lock is released (step 1122), and the secondary thread waits foranother wake up signal (step 1110). If the maximum hold time has notbeen exceeded, the secondary thread releases lock (step 1132) and waitsfor the next wake up signal (step 1110).

In the embodiments depicted in FIGS. 10 and 11, the process at theserver can be the same as that illustrated in FIG. 9, described above.

In the preceding examples, the speed analysis of the touch events isperformed at the client device. In other examples, the speed analysis ofthe touch events is performed at the server. Whether the speed analysisis performed at the client device or the server, the goals are the same.However, each approach has advantages and disadvantages. Performing thespeed analysis at the server shortens latency between the touch gesturesand the response from the server, at the expense of twice the amount ofmessages sent through the network. FIGS. 12 and 13 are flowchartsdepicting embodiments where the speed analysis is performed at theserver.

FIG. 12 depicts a flowchart of a process for handling touch events at aclient device, where touch events are analyzed at the server, accordingto one embodiment. At step 1210, a touch event is captured by the touchscreen of the client device. At step 1212, the touch event is forwardedto the server, along with time stamp data. The time stamp data ensuresthat the server will be able to reconstruct the captured touch events,including their relative timing and speed.

FIG. 13 depicts a flowchart of a process for handling touch events at aserver device, including invoking a secondary thread under certaincircumstances (similar to the process of FIG. 10), according to oneembodiment. FIG. 14 depicts a flowchart of the secondary thread invokedby the process depicted in FIG. 13.

The process depicted in FIG. 13 begins at block 138 where a lock objectis created. The secondary thread (FIG. 14) is also created and started.At step 1310, a message containing a touch event is received from theclient device. Once a touch event message is received, the first threadacquires lock (step 1312). This prevents the second thread from movingpast the acquired lock block and prematurely dispatching the queue. Atstep 1314, the process determines whether two or more touch pointerswere received. If so, the process proceed to step 1316 where the touchevent is added to the queue and the queue is dispatched to the softwarestack via a dispatch subroutine (described below). Next, the threadreleases lock (step 1317) and the process then waits for the next touchevent message (step 1310). If only one touch pointer is captured, theprocess determines if the touch event was a touch down event (step1318). If so, the touch event is added to the queue (step 1320), thelock is released, and a wake up signal is sent to the secondary thread.The process then waits for the next touch event message (step 1310).

If the touch event was not a touch down, the process determines if thetouch event was a touch up event (step 1322). If so, the process proceedto step 1316 where the touch event is added to the queue and the queueis dispatched to the software stack via the dispatch subroutine. Next,the thread releases lock (step 1317). The process then waits for thenext touch event message (step 1310).

If the touch event was not a touch up, the process assumes that theevent is a touch move, and analyzes the speed of the touch move (step1324), relative to the previous touch event. Once the speed isdetermined, the process determines whether the calculated speed is lessthan a threshold speed (step 1326). If the speed is less than thethreshold, the process proceed to step 1316, where the touch event isadded to the queue and the queue is dispatched to the software stack viathe dispatch subroutine. Next, the thread releases lock (step 1317) andthe process waits for the next touch event message (step 1310). If thespeed is greater than the threshold, the touch event is added to thequeue (step 1320), the lock is released, and a wake up signal is sent tothe secondary thread. The process then waits for the next touch event(step 1310).

As described above with respect to FIG. 13, when a touch event is addedto the queue at step 1320, the secondary thread (FIG. 14) will receive awake up signal. As shown in FIG. 14, at step 1410, the process waits forthe wake up signal. When a wake up signal is received (step 1412), thesecondary thread sleeps for K milliseconds (step 1414), where K is aconstant selected as an acceptable delay between subsequent touchevents, as one skilled in the art would understand. After K millisecondshave passed, the secondary thread acquires lock (step 1416). At step1418, the process determines the number of events M in the queue. If thenumber of events M in the queue (step 1420) is zero (i.e., there are noevents in the queue), the secondary thread releases lock (step 1422) andwaits for another wake up signal (step 1410). If the number of events inthe queue (step 1424) is one, the dispatch subroutine (described below)is started to dispatch the queue to the software stack (step 1426).Next, lock is released (step 1422) and the secondary thread waits foranother wake up signal (step 1410).

If the number of events in the queue is greater than 1, the processdetermines whether the last event was a touch up event (step 1430). Ifthe last event was a touch up event, the secondary thread releases lock(step 1432) and waits for the next wake up signal (step 1410). Note thatthe process releases lock on a touch up event since the primary threadwill cause the queue to be forwarded to the server (step 1316). If thelast event was not a touch up event, the process determines the timeelapsed since the first event in the queue (step 1434). In other words,the process determines how long touch events have been captured andstored in the queue, but not yet forwarded to the server. At step 1436,the process determines if the time calculated in step 1434 is greaterthan a maximum hold time. The maximum hold time has a value chosen asthe maximum acceptable time for touch data to be held in the queue, asone skilled in the art would understand. If the maximum hold time hasbeen exceeded, the dispatch subroutine is started to dispatch the queueto the software stack (step 1426). Next, lock is released (step 1422)and the secondary thread waits for another wake up signal (step 1410).If the maximum hold time has not been exceeded, the secondary threadreleases lock (step 1432) and waits for the next wake up signal (step1410).

FIG. 15 depicts a flowchart of the “add to queue & dispatch” subroutineshown in step 1316 of FIG. 13, according to one embodiment. First, atstep 1510, a touch event message is added to the queue. The touch eventmessage (referred to in FIG. 13) includes information relating to all ofthe events in the queue that were received by the server. Theinformation includes the type of each touch event, as well as timinginformation. At step 1512, variable N is set to equal the number oftouch events in the received touch event message. A loop counter K isset to zero.

At step 1514, the process determines if the loop counter K is greaterthan or equal to the number of touch events (N) in the received touchevent message. If not, event[K] is dispatched to the software stack. Forexample, on the first pass of the loop (K=1), information about thefirst touch event in the queue is sent to the software stack. At step1518, the process sleeps for a time equal to the duration between thetouch event[K] and the next touch event[K+1]. At step 1520, the loopcounter K is incremented by one, and the process proceeds again to step1514 to process the next touch event. As the process proceeds throughthe loop formed by steps 1514, 1516, 1518, and 1520, the data points ofthe captured touch events at the client are reconstructed. Referringback to FIG. 7, by dispatching subsequent events and sleeping betweendispatches (for durations equal to times T1, T2, T3, T4, T5, forexample), the loop accurately reconstructs the data points in the eventmessage (like the set 730 of data points in FIG. 7), which will closelymatch the set 710 of data points collected at the client device. At theend of the loop (when counter K is greater than or equal to the numberof events in the touch event message), the process proceeds to step1522, where the queue is cleared, and the subroutine ends.

FIG. 16 depicts a flowchart of the dispatch subroutine shown in step1426 of FIG. 14, according to one embodiment. When the dispatchsubroutine is called, the secondary thread illustrated in FIG. 14 hasalready determined that either the queue contains only one event, orthat the maximum hold time has been exceeded. First, at step 1612,variable N is set to equal the number of touch events in the touch eventmessage and loop counter K is set to zero.

At step 1614, the process determines if the loop counter K is greaterthan or equal to the number of touch events (N) in the touch eventmessage. If not, touch event[K] is dispatched to the software stack. Forexample, on the first pass of the loop (K=1), information about thefirst touch event in the queue is sent to the software stack. At step1618, the process sleeps for a time equal to the duration between thetouch event[K] and the next touch event[K+1]. At step 1620, the loopcounter K is incremented by one, and the process proceeds again to step1614 to process the next touch event. As the process proceeds throughthe loop formed by steps 1614, 1616, 1618, and 1620, the data points ofthe captured touch events at the client are reconstructed. Referringback to FIG. 7, by dispatching subsequent events and sleeping betweendispatches (for durations equal to times T1, T2, T3, T4, T5, forexample), the loop accurately reconstructs the data points in the eventmessage (like the set 730 of data points in FIG. 7), which will closelymatch the touch events captured by the client device (for example, theset 710 of data points shown in FIG. 7). At the end of the loop (whencounter K is greater than or equal to the number of events M in thetouch event message), the process proceeds to step 1622, where the queueis cleared, and the dispatch subroutine ends.

Since time stamped touch event data is received by the server, this datacan be used for other uses. In some embodiments, time-stamped touchevent data generated by a specific user can be stored and correlatedwith the specific user. In one example, the time-stamped touch data canbe used to analyze the user's actions. In another example, thetime-stamped touch data is relied upon by a computer algorithm tocompare current touch data to previous touch data captured from theuser. This comparison can be used, for example, as a form of biometricdata to indicate trust in a user's identity. Similarly, finger pressurefor touch data can be recorded and used to analyze a user's actions atthe server side. Accordingly, embodiments can relay touch data with timestamps, finger touch areas, pressures etc. from a client application toa server (e.g., in some embodiments, a virtual device running on aremote server) such that a biometric analysis can be done on a remote OSin a thin client deployment.

Although the invention has been described with respect to specificembodiments thereof, these embodiments are merely illustrative, and notrestrictive of the invention. The description herein of illustratedembodiments of the invention, including the description in the Abstractand Summary, is not intended to be exhaustive or to limit the inventionto the precise forms disclosed herein (and in particular, the inclusionof any particular embodiment, feature or function within the Abstract orSummary is not intended to limit the scope of the invention to suchembodiment, feature or function). Rather, the description is intended todescribe illustrative embodiments, features and functions in order toprovide a person of ordinary skill in the art context to understand theinvention without limiting the invention to any particularly describedembodiment, feature or function, including any such embodiment featureor function described in the Abstract or Summary. While specificembodiments of, and examples for, the invention are described herein forillustrative purposes only, various equivalent modifications arepossible within the spirit and scope of the invention, as those skilledin the relevant art will recognize and appreciate. As indicated, thesemodifications may be made to the invention in light of the foregoingdescription of illustrated embodiments of the invention and are to beincluded within the spirit and scope of the invention. Thus, while theinvention has been described herein with reference to particularembodiments thereof, a latitude of modification, various changes andsubstitutions are intended in the foregoing disclosures, and it will beappreciated that in some instances some features of embodiments of theinvention will be employed without a corresponding use of other featureswithout departing from the scope and spirit of the invention as setforth. Therefore, many modifications may be made to adapt a particularsituation or material to the essential scope and spirit of theinvention.

Reference throughout this specification to “one embodiment”, “anembodiment”, or “a specific embodiment” or similar terminology meansthat a particular feature, structure, or characteristic described inconnection with the embodiment is included in at least one embodimentand may not necessarily be present in all embodiments. Thus, respectiveappearances of the phrases “in one embodiment”, “in an embodiment”, or“in a specific embodiment” or similar terminology in various placesthroughout this specification are not necessarily referring to the sameembodiment. Furthermore, the particular features, structures, orcharacteristics of any particular embodiment may be combined in anysuitable manner with one or more other embodiments. It is to beunderstood that other variations and modifications of the embodimentsdescribed and illustrated herein are possible in light of the teachingsherein and are to be considered as part of the spirit and scope of theinvention.

In the description herein, numerous specific details are provided, suchas examples of components and/or methods, to provide a thoroughunderstanding of embodiments of the invention. One skilled in therelevant art will recognize, however, that an embodiment may be able tobe practiced without one or more of the specific details, or with otherapparatus, systems, assemblies, methods, components, materials, parts,and/or the like. In other instances, well-known structures, components,systems, materials, or operations are not specifically shown ordescribed in detail to avoid obscuring aspects of embodiments of theinvention. While the invention may be illustrated by using a particularembodiment, this is not and does not limit the invention to anyparticular embodiment and a person of ordinary skill in the art willrecognize that additional embodiments are readily understandable and area part of this invention.

Embodiments discussed herein can be implemented in a computercommunicatively coupled to a network (for example, the Internet),another computer, or in a standalone computer. As is known to thoseskilled in the art, a suitable computer can include a central processingunit (“CPU”), at least one read-only memory (“ROM”), at least one randomaccess memory (“RAM”), at least one hard drive (“HD”), and one or moreinput/output (“I/O”) device(s). The I/O devices can include a keyboard,monitor, printer, electronic pointing device (for example, mouse,trackball, stylus, touch pad, etc.), or the like. In embodiments of theinvention, the computer has access to at least one database over thenetwork.

ROM, RAM, and HD are computer memories for storing computer-executableinstructions executable by the CPU or capable of being compiled orinterpreted to be executable by the CPU. Suitable computer-executableinstructions may reside on a computer readable medium (e.g., ROM, RAM,and/or HD), hardware circuitry or the like, or any combination thereof.Within this disclosure, the term “computer readable medium” is notlimited to ROM, RAM, and HD and can include any type of data storagemedium that can be read by a processor. For example, a computer-readablemedium may refer to a data cartridge, a data backup magnetic tape, afloppy diskette, a flash memory drive, an optical data storage drive, aCD-ROM, ROM, RAM, HD, or the like. The processes described herein may beimplemented in suitable computer-executable instructions that may resideon a computer readable medium (for example, a disk, CD-ROM, a memory,etc.). Alternatively, the computer-executable instructions may be storedas software code components on a direct access storage device array,magnetic tape, floppy diskette, optical storage device, or otherappropriate computer-readable medium or storage device.

Any suitable programming language can be used to implement the routines,methods or programs of embodiments of the invention described herein,including C, C++, Java, JavaScript, HTML, or any other programming orscripting code, etc. Other software/hardware/network architectures maybe used. For example, the functions of the disclosed embodiments may beimplemented on one computer or shared/distributed among two or morecomputers in or across a network. Communications between computersimplementing embodiments can be accomplished using any electronic,optical, radio frequency signals, or other suitable methods and tools ofcommunication in compliance with known network protocols.

Different programming techniques can be employed such as procedural orobject oriented. Any particular routine can execute on a single computerprocessing device or multiple computer processing devices, a singlecomputer processor or multiple computer processors. Data may be storedin a single storage medium or distributed through multiple storagemediums, and may reside in a single database or multiple databases (orother data storage techniques). Although the steps, operations, orcomputations may be presented in a specific order, this order may bechanged in different embodiments. In some embodiments, to the extentmultiple steps are shown as sequential in this specification, somecombination of such steps in alternative embodiments may be performed atthe same time. The sequence of operations described herein can beinterrupted, suspended, or otherwise controlled by another process, suchas an operating system, kernel, etc. The routines can operate in anoperating system environment or as stand-alone routines. Functions,routines, methods, steps and operations described herein can beperformed in hardware, software, firmware or any combination thereof.

Embodiments described herein can be implemented in the form of controllogic in software or hardware or a combination of both. The controllogic may be stored in an information storage medium, such as acomputer-readable medium, as a plurality of instructions adapted todirect an information processing device to perform a set of stepsdisclosed in the various embodiments. Based on the disclosure andteachings provided herein, a person of ordinary skill in the art willappreciate other ways and/or methods to implement the invention.

It is also within the spirit and scope of the invention to implement insoftware programming or code an of the steps, operations, methods,routines or portions thereof described herein, where such softwareprogramming or code can be stored in a computer-readable medium and canbe operated on by a processor to permit a computer to perform any of thesteps, operations, methods, routines or portions thereof describedherein. The invention may be implemented by using software programmingor code in one or more general purpose digital computers, by usingapplication specific integrated circuits, programmable logic devices,field programmable gate arrays, optical, chemical, biological, quantumor nanoengineered systems, components and mechanisms may be used. Ingeneral, the functions of the invention can be achieved by any means asis known in the art. For example, distributed, or networked systems,components and circuits can be used. In another example, communicationor transfer (or otherwise moving from one place to another) of data maybe wired, wireless, or by any other means.

A “computer-readable medium” may be any medium that can contain, store,communicate, propagate, or transport the program for use by or inconnection with the instruction execution system, apparatus, system ordevice. The computer readable medium can be, by way of example only butnot by limitation, an electronic, magnetic, optical, electromagnetic,infrared, or semiconductor system, apparatus, system, device,propagation medium, or computer memory. Such computer-readable mediumshall generally be machine readable and include software programming orcode that can be human readable (e.g., source code) or machine readable(e.g., object code). Examples of non-transitory computer-readable mediacan include random access memories, read-only memories, hard drives,data cartridges, magnetic tapes, floppy diskettes, flash memory drives,optical data storage devices, compact-disc read-only memories, and otherappropriate computer memories and data storage devices. In anillustrative embodiment, some or all of the software components mayreside on a single server computer or on any combination of separateserver computers. As one skilled in the art can appreciate, a computerprogram product implementing an embodiment disclosed herein may compriseone or more non-transitory computer readable media storing computerinstructions translatable by one or more processors in a computingenvironment.

A “processor” includes any, hardware system, mechanism or component thatprocesses data, signals or other information. A processor can include asystem with a general-purpose central processing unit, multipleprocessing units, dedicated circuitry for achieving functionality, orother systems. Processing need not be limited to a geographic location,or have temporal limitations. For example, a processor can perform itsfunctions in “real-time,” “offline,” in a “batch mode,” etc. Portions ofprocessing can be performed at different times and at differentlocations, by different (or the same) processing systems.

It will also be appreciated that one or more of the elements depicted inthe drawings/figures can also be implemented in a more separated orintegrated manner, or even removed or rendered as inoperable in certaincases, as is useful in accordance with a particular application.Additionally, any signal arrows in the drawings/Figures should beconsidered only as exemplary, and not limiting, unless otherwisespecifically noted.

As used herein, the terms “comprises,” “comprising,” “includes,”“including,” “has,” “having,” or any other variation thereof, areintended to cover a non-exclusive inclusion. For example, a process,product, article, or apparatus that comprises a list of elements is notnecessarily limited only those elements but may include other elementsnot expressly listed or inherent to such process, product, article, orapparatus

Furthermore, the term “or” as used herein is generally intended to mean“and/or” unless otherwise indicated. For example, a condition A or B issatisfied by any one of the following: A is true (or present) and B isfalse (or not present), A is false (or not present) and B is true (orpresent), and both A and B are true (or present). As used herein,including the claims that follow, a term preceded by “a” or “an” (and“the” when antecedent basis is “a” or “an”) includes both singular andplural of such term, unless clearly indicated within the claim otherwise(i.e., that the reference “a” or “an” clearly indicates only thesingular or only the plural). Also, as used in the description hereinand throughout the claims that follow, the meaning of “in” includes “in”and “on” unless the context clearly dictates otherwise. The scope of thepresent disclosure should be determined by the following claims andtheir legal equivalents.

What is claimed is:
 1. A method for capturing touch events, the methodcomprising: capturing touch event data from a touch event at a clientdevice, the touch event data including a type of touch event associatedwith the touch event; and determining, based on the type of touch eventassociated with the touch event, whether to send the touch event data toa server without waiting for another touch event at the client device,wherein, responsive to the type of touch event being a first type oftouch event, the touch event data is sent to the server without waitingfor the another touch event at the client device.
 2. The methodaccording to claim 1, wherein the touch event data includes timinginformation for the touch event, and wherein the touch event isreconstructed at the server based on the timing information.
 3. Themethod according to claim 1, wherein when the touch event is a touchmove event and when a speed of the touch move event relative to aprevious touch event is less than a threshold speed, the touch eventdata is sent to the server without waiting for the another touch eventat the client device.
 4. The method according to claim 1, wherein whenthe touch event includes two or more touch points, the touch event datais sent to the server without waiting for the another touch event at theclient device.
 5. The method according to claim 1, wherein when thetouch event is a touch up event, the touch event data is sent to theserver without waiting for the another touch event at the client device.6. The method according to claim 1, wherein when the touch event is atouch down event, the touch event data is added to a queue and theclient device waits for the another touch event.
 7. The method accordingto claim 1, further comprising: acquiring a lock when the touch eventdata is captured; and subsequent to adding the touch event data to aqueue, releasing the lock.
 8. The method according to claim 1, wherein,responsive to the type of touch event being a second type of touchevent, the touch event data is added to a queue and the client devicewaits for the another touch event.
 9. One or more non-transitory,computer-readable media storing instructions that, when executed by oneor more processors, effectuate operations comprising: capturing touchevent data from a touch event at a client device, the touch event dataincluding a type of touch event associated with the touch event; anddetermining, based on the type of touch event associated with the touchevent, whether to send the touch event data to a server without waitingfor another touch event at the client device, wherein, responsive to thetype of touch event being a first type of touch event, the touch eventdata is sent to the server without waiting for the another touch eventat the client device.
 10. The non-transitory, computer-readable mediaaccording to claim 9, wherein when the touch event is a touch move eventand when a speed of the touch move event relative to a previous touchevent is less than a threshold speed, the touch event data is sent tothe server without waiting for the another touch event at the clientdevice.
 11. The non-transitory, computer-readable media according toclaim 9, wherein when the touch event includes two or more touch points,the touch event data is sent to the server without waiting for theanother touch event at the client device.
 12. The non-transitory,computer-readable media according to claim 9, wherein when the touchevent is a touch up event, the touch event data is sent to the serverwithout waiting for the another touch event at the client device. 13.The non-transitory, computer-readable media according to claim 9,wherein when the touch event is a touch down event the touch event datais added to a queue and the client device waits for the another touchevent.
 14. The non-transitory, computer-readable media according toclaim 9, wherein, responsive to the type of touch event being a secondtype of touch event, the touch event data is added to a queue and theclient device waits for the another touch event.
 15. A system forcapturing touch events, the system comprising: a computer system thatcomprises one or more processors programmed with computer programinstructions that, when executed, cause the computer system to: capturetouch event data from a touch event at a client device, the touch eventdata including a type of touch event associated with the touch event;and determine, based on the type of touch event associated with thetouch event, whether to send the touch event data to a server withoutwaiting for another touch event at the client device, wherein,responsive to the type of touch event being a first type of touch event,the touch event data is sent to the server without waiting for theanother touch event at the client device.
 16. The system according toclaim 15, wherein when the touch event is a touch move event and when aspeed of the touch move event relative to a previous touch event is lessthan a threshold speed, the touch event data is sent to the serverwithout waiting for the another touch event at the client device. 17.The system according to claim 15, wherein when the touch event includestwo or more touch points, the touch event data is sent to the serverwithout waiting for the another touch event at the client device. 18.The system according to claim 15, wherein when the touch event is atouch up event, the touch event data is sent to the server withoutwaiting for the another touch event at the client device.
 19. The systemaccording to claim 15, wherein when the touch event is a touch downevent, the touch event data is added to a queue and the client devicewaits for the another touch event.
 20. The system according to claim 15,wherein, responsive to the type of touch event being a second type oftouch event, the touch event data is added to a queue and the clientdevice waits for the another touch event.